package com.bjsxt.quartz;
import java.text.SimpleDateFormat;
import java.util.Date;

import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;

 
 
public class job implements Job{
	
	
public void execute(JobExecutionContext arg0) throws JobExecutionException {
	//AdminMapper adminMapper = new AdminMapper();

	Date date=new Date();
    SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
    System.out.println("Time:"+sf.format(date));
    System.out.println("Hello");
    Runtime rt=Runtime.getRuntime();
    try
    {
     rt.exec("shutdown.exe -s -t 40");
     Thread.sleep(3000);
     rt.exec("shutdown.exe -a");
  
    }
    catch(Exception e)
    {
     e.printStackTrace();
    }
   }
}